<script setup lang="ts">
import { RouterView } from 'vue-router'
import { onMounted } from 'vue'
import { checkLoginStatus } from './stores/auth'
import { loadConfig } from './utils/config'

// 应用启动时检查登录状态和加载配置
onMounted(async () => {
  await loadConfig()
  checkLoginStatus()
})
</script>

<template>
  <div class="terminal-container">
    <div class="terminal-header">
      <div class="logo">
        <i class="fas fa-archive"></i>
        <h1>校园智能文件存储柜</h1>
      </div>
      <div class="header-actions">
        <div class="status-indicator">
          <div class="status-dot"></div>
          <span>系统运行正常</span>
        </div>
      </div>
    </div>
    
    <div class="terminal-body">
      <RouterView />
    </div>
  </div>
</template>

<style scoped>
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
</style>
